﻿<!DOCTYPE html>


<html>


<head>
	<meta name="viewport" content="width=device-width, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0">

	<link rel="shortcut icon" type="image/png" href="../assets/logo/logo.png"/>

	<style>
		body {
			overflow: hidden;
			margin: 0;
		}
	</style>
	
	<script type="importmap">
	  {
		"imports": {
			"three": "https://cdn.jsdelivr.net/npm/three@0.168.0/build/three.module.js",
			"3d-assets/": "../src/"
		}
	  }
	</script>
</head>


<body>
	<script type="module">
	
		import * as THREE from "three";
		import { WineBottle } from "3d-assets/wine-bottle.js";

		var renderer = new THREE.WebGLRenderer( { antialias: true } );
		renderer.setSize( innerWidth, innerHeight );
		document.body.appendChild( renderer.domElement );

		var scene = new THREE.Scene();
		scene.background = new THREE.Color('white');

		var camera = new THREE.PerspectiveCamera( 30, innerWidth / innerHeight );
		camera.position.set( 0.2, 0.3, 0.6 );
		camera.lookAt( scene.position );

		var light = new THREE.DirectionalLight( "white", 3 );
		light.position.set( 1, 1, 1 );
		scene.add( light );

		var object = new WineBottle( WineBottle.defaults );
		scene.add( object );

		renderer.setAnimationLoop( ()=>renderer.render( scene, camera ) );

	</script>
</body>
</html>